package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CustomerPointsMapper;
import com.ruoyi.system.domain.CustomerPoints;
import com.ruoyi.system.service.ICustomerPointsService;

/**
 * 客户积分Service业务层处理
 * 
 * @author LK
 * @date 2024-06-22
 */
@Service
public class CustomerPointsServiceImpl implements ICustomerPointsService 
{
    @Autowired
    private CustomerPointsMapper customerPointsMapper;

    /**
     * 查询客户积分
     * 
     * @param customerId 客户积分主键
     * @return 客户积分
     */
    @Override
    public CustomerPoints selectCustomerPointsByCustomerId(String customerId)
    {
        return customerPointsMapper.selectCustomerPointsByCustomerId(customerId);
    }

    /**
     * 查询客户积分列表
     * 
     * @param customerPoints 客户积分
     * @return 客户积分
     */
    @Override
    public List<CustomerPoints> selectCustomerPointsList(CustomerPoints customerPoints)
    {
        return customerPointsMapper.selectCustomerPointsList(customerPoints);
    }

    /**
     * 新增客户积分
     * 
     * @param customerPoints 客户积分
     * @return 结果
     */
    @Override
    public int insertCustomerPoints(CustomerPoints customerPoints)
    {
        return customerPointsMapper.insertCustomerPoints(customerPoints);
    }

    /**
     * 修改客户积分
     * 
     * @param customerPoints 客户积分
     * @return 结果
     */
    @Override
    public int updateCustomerPoints(CustomerPoints customerPoints)
    {
        return customerPointsMapper.updateCustomerPoints(customerPoints);
    }

    /**
     * 批量删除客户积分
     * 
     * @param customerIds 需要删除的客户积分主键
     * @return 结果
     */
    @Override
    public int deleteCustomerPointsByCustomerIds(String[] customerIds)
    {
        return customerPointsMapper.deleteCustomerPointsByCustomerIds(customerIds);
    }

    /**
     * 删除客户积分信息
     * 
     * @param customerId 客户积分主键
     * @return 结果
     */
    @Override
    public int deleteCustomerPointsByCustomerId(String customerId)
    {
        return customerPointsMapper.deleteCustomerPointsByCustomerId(customerId);
    }
}
